﻿<%@ Page Title="View Member Page" Language="C#" MasterPageFile="  ~/template/Site.Master" AutoEventWireup="true" CodeBehind="ViewMember.aspx.cs" Inherits="EAAdmin.ViewMember" %>

<%@ Import Namespace="EA.DTO" %>
<%@ Import Namespace="EA.Common" %>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <form id="form1" runat="server">
        <div class="page_name">List of Member</div>
         <div class="error">
            <%                
                String alert = "";
                if (Attributes.ContainsKey("err"))
                {
                    alert = (String)Attributes["err"];
            %>
            <div class="message">
                <div><%=alert%></div>
            </div>
            <%  }
                if (Attributes.ContainsKey("success"))
                {
                    alert = (String)Attributes["success"];
            %>
            <div class="message_alert">
                <div><%=alert%></div>
            </div>
            <%  } %>
        </div>
        <table class="table">
            <tr>
                <th>User Name</th>
                <th>Full Name</th>
                <th>Role</th>
                <th>Last Log On Date</th>
                <th>Edit</th>
            </tr>
            <% List<MemberTO> listMember = (List<MemberTO>)Attributes["listMember"]; %>
            <%
                for (int i = 0; i < listMember.Count; i++)
                {  
            %>
            <tr>
                <td><%=listMember[i].UserName%></td>
                <td><%=listMember[i].FullName %></td>
                <td><%=listMember[i].Role %></td>
                <td><%=listMember[i].LastLogOnDate %></td>
                <td>
                    <a href="/ViewMember.aspx?action=Delete&id=<%=listMember[i].ID %>" style="margin-right: 5px; float: right">
                        <img src="/public/images/cross.png" />
                    </a>
                    <a href="/EditMember.aspx?id=<%=listMember[i].ID %>" style="margin-right: 5px; float: right">
                        <img src="/public/images/pencil.png" />
                    </a>
                </td>
            </tr>
            <% } %>
        </table>
    </form>
</asp:Content>
